$ () ->
	$(".delete_btn").click (e) ->
		param =
			id: $(this).children(".delete_id").val()
			
		message = confirm "是否确认删除"

		if message is true
			$.post "/api/admin/commodity/delete-type",param, (res) ->
				if res.status.errCode is 0
					alert "删除成功"
					window.location.reload()
				else
					alert res.status.message